Resource File Management
DevAssure now offers a centralised location to manage resource files used in your tests. This allows you to:
- Upload and store test data (CSV files, etc.) for efficient reuse across tests.
- Organize and manage visual testing snapshots for easier reference and maintenance.
- Streamline your testing process by keeping all necessary resources in one central location.
Accessing Resource Files:
- Within your project, navigate to the Test Data section. Select Manage Resource Files ,this section provides an overview of all uploaded files and their details.
- Select the required folder and click the "Add File" button to add new resource files to your project. You can upload various file formats commonly used in testing, including CSV files for test data.
- Right click on the uploaded files for the context menu on the manage options.
- The "Open File" option allows you to view the file data directly from the DevAssure App.This is helpful for quickly reviewing test data or visual snapshots
- The Visual Testing Snapshots sections provides you with more control to manage the snapshot files directly.
Organizing Resources
DevAssure allows you to categorize and organize your resources for better clarity.
- You can create folders within the resource management system to group related files. This can involve creating separate folders for different test suites or functionalities under test.
Once uploaded and organized, you can leverage your resource files directly within your test cases.
Example Using Resource Files:
This example demonstrates how to leverage Resource Files( CSV file) and use it in a test case
- Create a CSV file named product.csv and added it to the respective folder under resources. Here's an example:
product_name,search_term,expected_result
Shirt,blue shirt,List of blue shirts
Laptop,gaming laptop,List of gaming laptops
Headphones,wireless headphones,List of wireless headphones
-
Create a new test case to access the resource files and use the file data as input for the testcase. DevAssure provides test actions to access and utilize test data from CSV files during test execution.
-
In the below testcase the values from the product.csv under UATdata folder are read as an array and the required quantity values is passed as input the web element.
-
Note : You can access sub-folders under resources with the "/"
-
The required discount on the above quantity is read as object from the productdiscount.csv and provided as an input to the discount element.